package core;

import java.util.List;

import model.dto.User;

import org.apache.log4j.Logger;

import com.opensymphony.xwork2.ActionSupport;

import core.db.DBTool;

public class Test extends ActionSupport {
	
	private List<User> userList ; 
	public List<User> getUserList() {
		return userList;
	}

	public static Logger getLogger() {
		return logger;
	}

	public void setUserList(List<User> userList) {
		this.userList = userList;
	}

	public static void setLogger(Logger logger) {
		Test.logger = logger;
	}

	public static Logger logger = Logger.getRootLogger() ;

	@Override
	public String execute() throws Exception {
		List<User> res = DBTool.getResults(new User(), "select * from cdUser") ;
		for(User u : res){
			System.out.println(u.getUserId() + ":"+u.getPassword()+":"+u.getUserName());
		}
		userList = res ;
		return SUCCESS;
	}
}